package com.education.wisdom.service.impl;


import com.education.wisdom.mapper.CommentsMapper;
import com.education.wisdom.pojo.Comments;
import com.education.wisdom.service.ICommentsService;
import com.education.wisdom.vo.CommentsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 课后评价 服务层实现
 *
 * @author ruoyi
 * @date 2018-11-09
 */
@Service
public class CommentsServiceImpl implements ICommentsService {
    @Autowired
    private CommentsMapper commentsMapper;

    /**
     * 查询所有评论信息
     *
     * @param map
     * @return
     */
    @Override
    public List<CommentsVo> selectCommentsAll(Map<String, Object> map) {
        return commentsMapper.selectCommentsAll(map);
    }

    @Override
    public List selectCommentsAllByteacher(Map<String, Object> map) {
        return commentsMapper.selectCommentsAllByteacher(map);
    }

    /**
     * 新增课后评价
     *
     * @param comments 课后评价信息
     * @return 结果
     */
    @Override
    public int insertComments(Comments comments) {
        return commentsMapper.insertComments(comments);
    }

    @Override
    public List<Comments> selectByCatalogId(Integer catalogId) {
        return commentsMapper.selectByCatalogId(catalogId);
    }

    @Override
    public List<Comments> selectByType(Map<String, Object> map) {
        return commentsMapper.selectByType(map);
    }

    @Override
    public List<Comments> selectByLabeId(Map<String, Object> map) {
        return commentsMapper.selectByLabeId(map);
    }
}
